create  table jms_dm.dm_sqs_receiver_user_order_complaint_cnt_dt (
                                                                     receiver_mobile_phone varchar(16) comment '电话号',
                                                                     receiver_name varchar(16) comment '收件人姓名',
                                                                     receiver_province_name varchar(64) comment '收件省name',
                                                                     receiver_province_id varchar(32) comment '收件省id',
                                                                     receiver_city_name varchar(64) comment '收件城市id',
                                                                     receiver_city_id varchar(32) comment '收件城市name',
                                                                     receiver_area_name varchar(64) comment '收件区name',
                                                                     receiver_area_id varchar(32) comment '收件区id',
                                                                     waybill_cnt int comment '进三个月快件数量     ',
                                                                     complaint_cnt int comment '投诉量',
                                                                     qxt_waybill_cnt int comment '七星潭进三个月快件数量',
                                                                     thd_waybill_cnt int comment '桃花岛进三个月快件数量',
                                                                     zjs_waybill_cnt int comment '紫金山进三个月快件数量',
                                                                     other_waybill_cnt int comment '紫金山进三个月快件数量',
                                                                     is_new_user int comment '是否新用户 1是0否',
                                                                     complaint_time datetime comment '最新投诉时间',
                                                                     input_time datetime comment '最新订单录入时间',
                                                                     qxt_complaint_cnt int comment '七星潭进三个月投诉量',
                                                                     thd_complaint_cnt int comment '桃花岛进三个月投诉量',
                                                                     zjs_complaint_cnt int comment '紫金山进三个月投诉量',
                                                                     other_complaint_cnt int comment '紫金山进三个月投诉量',
                                                                     date_time date comment '查询日期'
) ENGINE=OLAP
DUPLICATE KEY(receiver_mobile_phone, receiver_name)
COMMENT '终端用户画像订单投诉占比'
PARTITION BY RANGE(date_time)
(START ("2023-10-10") END ("2023-10-17") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(receiver_mobile_phone) BUCKETS 8
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);